<template>
	<div>
		<p v-bind:class="obj">我是红色</p>
		<p v-bind:class="arr">我是数组class</p>
		<ul>
			<li :class="[{active:index%2==0},'info'+id]" v-for="(name,index) in names">{{name}}</li>
		</ul>
		<p :style="styobj">很适合</p>
	</div>
</template>
<script>
	export default {
		data() {
			return {
				obj:{
					'active':true
				},
				arr: ["demo11","demo22"],
				names:["a","b","c","d","e"],
				id: 11,
				styobj:{
					"fontSize":"30px",
					"color":"red"
				}
			}
		}
	}
</script>
<style>
	.active {
		color: red;
	}

	.demo11 {
		background: skyblue;
		color: pink;
	}
</style>